Speakerphone using digitally compressed audio to control voice path gain

ABSTRACT

A mobile radiotelephone (120) includes a microcomputer (220), speakerphone control circuitry (106) and mobile radio (112). Mobile radio (112) includes a transmitter (242), receiver (244) and a duplexer (243) for coupling the transmitter (242) and receiver (243) to the mobile antenna. In the transmit voice path, speakerphone control circuitry (106) includes switch (201), variable gain amplifier (202), compressor amplifier (203), switch (204), variable gain amplifier (205), and two registers (212-213). In the receive voice path, speakerphone control circuitry (106) includes variable gain amplifier (232), expander amplifier (233), switch (234), variable gain amplifier (235), switch (236) and two registers (216-217). Speakerphone control circuitry (106) also includes rectifier/filter (224), a companding analog-to-digital (A/D) converter (225), two latches (218-219), rectifier/filter (226) and two registers (214-215). Microcomputer (220) accesses registers (212-217) by means of a data bus (222) including address, control and data lines. Microcomputer (220) utilizes digital samples from A/D converter (225) to continuously generate and store in its memory an envelope signal and a valley signal for the transmit and receive voice paths. In order to determine when to switch gain between the voice paths, microcomputer (220) compares the envelope signal to the valley signal to detect the presence of voice signals and, if the voice signals are detected for a pre-selected time, the gain of the path in which voice signals have been detected is increased and the gain of the other path is decreased.

BACKGROUND OF THE INVENTION

The present invention relates generally to speakerphones, and moreparticularly to an improved speakerphone using digitally compressedaudio to control voice path gain that can advantageously be utilized inmobile radiotelephones.

In both radio and landline telephone systems, a user communicates bymeans of a handset that includes a speaker at one end which is placedclose to the user's ear and a microphone at the other end which is heldclose to the user's mouth. Thus, the user has only one free hand sincethe other must be used to hold the telephone handset. In order toprovide a greater degree of freedom to the user, speakerphones have beendeveloped for use in landline telephone systems. Conventionalspeakerphones, such as that described in U.S. Pat. No. 3,751,602, arecoupled to the telephone line and when enabled allow the user to freelymove about while still communicating with another party. Suchspeakerphones typically compare the volume of the two parties and selectthe party speaking the loudest. Furthermore, conventional speakerphonesalways revert to the listen mode a short time interval after thehands-free party stops talking. However, conventional speakerphonessuffer from a number of problems including inability to accommodate highambient noise environments and breakup due to feedback from the speakerto the microphone when the speaker amplification has been turned up.Although these conventional speakerphones work reasonably well whenutilized with landline telephones in relatively quiet surroundings, theydo not operate correctly when used in noisy environments and especiallywhen used with a radio due to the high degree of ambient noiseencountered in vehicles. For example, a high level of ambient noise maycause such speakerphones to always select the hands-free party.

The problem of accommodating a high degree of ambient noise has beenaddressed in the speakerphones described in U.S. Pat. Nos. 4,378,603 and4,400,584 by selecting only one of the parties while muting the otherparty, and switching between parties using the output of audio signaldetectors that detect the presence of audio signals only when the audiosignals exceed the background noise by a predetermined amount. Suchspeakerphones require dedicated special-purpose circuitry for detectingaudio signals and producing various time constants, that is usually in acustom integrated circuit and can not be adjusted without changingassociated resistors and capacitors. Accordingly, there is a need for animproved speakerphone that uses digitally compressed audio to controlvoice path gain.

SUMMARY OF THE INVENTION

Accordingly, it is a general object of the present invention toproviding an improved speakerphone that uses digitally compressed audioto control voice path gain.

It is another object of the present invention to providing an improvedspeakerphone that uses digitally compressed audio to control voice pathgain for providing hands-free voice communications in mobileradiotelephones.

Briefly described, the present invention encompasses an improvedspeakerphone for a radiotelephone for communicating voice signals by wayof a radio channel. The radiotelephone includes a radio for transmittinga first signal including voice signals on and receiving a second signalincluding voice signals from the radio channel. The improvedspeakerphone comprises a microphone for producing the first signal; aspeaker for emitting the second signal; compressor amplifying circuitrycoupled between the microphone and the radio and being responsive tofirst control signals for selecting one of a plurality of gain settingsand amplifying and compressing the first signal; expander amplifyingcircuitry coupled between the speaker and the radio and being responsiveto second control signals for selecting one of a plurality of gainsettings and amplifying and expanding the second signal; and controlcircuitry coupled to the output of the compressor amplifying circuitryand the input of the expander amplifying circuitry for detecting voicesignals in the first and second signals and, in response to detection ofvoice signals in one of the first and second signals, producing thefirst and second control signals for adjusting the gain settings of thecompressor amplifying circuitry and the expander amplifying circuitrysuch that the gain setting for said one of the first and second signalsis increased and the gain setting of the other of the first and secondsignals is decreased.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a radiotelephone system including alandline telephone and a mobile radiotelephone that may advantageouslyutilize the present invention.

FIG. 2 is a detailed block diagram of a mobile radiotelephone embodyingthe present invention.

FIG. 3 is a table showing the register bit map for the mobileradiotelephone in FIG. 2.

FIGS. 4A, 4B, 5A, 5B, 6 and 7 are flow charts illustrating the processsteps executed by the mobile radiotelephone in FIG. 2 in using digitallycompressed audio to control voice path gain.

DESCRIPTION OF THE PREFERRED EMBODIMENT

In FIG. 1, there is illustrated a communications system includinglandline telephones 138 and mobile radiotelephones 120 (hereinafterreferred to as "mobiles") that may advantageously utilize the improvedspeakerphone of the present invention. Mobile 120 includes mobile radio112, microphone 102 and speaker 104 for hands-free communications,mobile telephone 108 including a conventional hand-held handset, andspeakerphone control circuitry 106 for interfacing microphone 102,speaker 104 and mobile telephone 108 to mobile radio 112. The improvedspeakerphone of the present invention includes microphone 102, speaker104 and speakerphone control circuitry 106. Mobile telephone 108 may bea handset or a handset and cradle that includes conventional circuitryfor controlling operation of mobile radio 112. Mobile radio 112 may beany conventional radiotelephone, such as an IMTS (Improved MobileTelephone Service) radiotelephone or cellular radiotelephone. Furtherdetails of the signalling process and the nature of the circuitry formobile telephone 108 and mobile radio 112 are provided in MotorolaService Manuals 68P81039E25, 68P81029E65 and 68P81037E85, all of whichare published by and available from Motorola Service Publications,Schaumburg, Ill.

In conventional radiotelephone systems such as IMTS or cellularradiotelephone systems, a party in a vehicle communicates by way ofmobile 120 with a base station 122 which is interconnected by a controlterminal 124 to a landline telephone central office 126. Controlterminal 124 includes control circuitry that provides a communicationpath from the base station 122 to hybrid circuitry (not shown, butsimilar to block 142) which is interconnected to a telephone line ortrunk of telephone central office 126. A number dialed by the mobileparty by means of mobile 120 is received by the control terminal 124 andforwarded to the telephone central office 126 on the telephone line ortrunk. The telephone central office 126 receives the dialed telephonenumber and routes the mobile party by way of landline 144 to the desiredland party telephone, i.e., to hybrid circuitry 142 and landlinetelephone 138. Hybrid circuitry 142 includes conventional circuitry thatinterfaces landline telephone 138 to duplex landline 144. Hybridcircuitry 142 is typically part of landline telephone 138. A similarprocess is employed when a land party dials the number of a mobile partyby means of conventional telephone 138. Further details of thesignalling process and the nature of the circuitry for control terminal124 is provided in Motorola Service Manual 68P81028E65 and for the basestation 122 in Motorola Service Manual 68P81033E10, all of which arepublished by and available from Motorola Service Publications,Schaumburg, Ill.

The communications system in FIG. 1 may also include portableradiotelephones (hereinafter referred to as "portables") of the typedescribed in U.S. Pat. Nos. 3,906,166 and 3,962,553 and in an article byAlbert J. Leitich and Donald C. Linder, entitled "PortableRadiotelephone for Cellular Systems", published in the Proceedings ofthe 30th Annual Conference of the IEEE Vehicular Technology Society,Sept. 15-17, 1980, Dearborn, MI. Such portables can be carried by theuser and operated wherever he may be, for example, from his office orhis vehicle, and can likewise include the improved speakerphone of thepresent invention.

In order to provide a mobile party with the same type of telephoneservice that a land party receives, it is necessary that each radiochannel 114 be a duplex radio channel, having a separate transmitfrequency and a separate receive frequency. Thus, mobile radio 112 maybe simultaneously transmitting on one frequency and receiving on theother, such that both the mobile party and the land party maysimultaneously talk and listen. Mobile telephone 108 includes a handsetthat is similar to handsets typically found in conventional land-linetelephone instruments. During a telephone conversation, it is necessarythat the mobile party hold the handset to his ear just as a land partydoes. However, it would be much safer and convenient for the mobileparty if the conversation during a telephone call could be achievedwithout necessity of any physical actions.

By utilizing the improved speakerphone of the present invention, amobile party can converse with a land party for the duration of a callwith no required physical action, thus freeing the mobile party of taskswhich would interfere with the safe operation of his vehicle. Theimproved speakerphone of the present invention, together with a mobiletelephone 108 such that described in U.S. Pat. Nos. 4,122,304 and4,220,820 which provides for onhook automatic dialing of telephonenumbers stored in a memory, allows a mobile party to safely maketelephone calls without the necessity of removing one of his hands fromthe steering wheel for the duration of the call.

In order to provide for hands-free operation, mobile 120 includes aseparate microphone 102, a separate speaker 104, and control circuitry106. Alternatively, the microphone and speaker in the handset of mobiletelephone 108 could be utilized if properly designed and oriented withrespect to the hands-free party. In most radio applications, it isadvantageous to utilize a separate microphone 102 for receiving thehands-free party's speech. By experimentation, it has been found thatthe best mounting location for microphone 102 in a vehicle is on theinterior roof lining of the automobile either on the visor or justbefore the edge of the visor. This location has been found to maximizevoice pick-up while minimizing background noise pick-up. In additionthis microphone mounting location also provides some degree of inherentvibration damping. Experimentation has also determined that anomni-directional electrode microphone cartridge provides goodperformance while at the same time being cost effective. Also, forvehicular applications, speaker 104 can be located on the dashboard ofthe vehicle or on the deck near the rear window of the vehicle.

Referring next to FIG. 2, there is illustrated a detailed block diagramof the speakerphone control circuitry 106 and mobile radio 112 in mobile120. Mobile radio 112 includes a transmitter 242, receiver 244 and aduplexer 243 for coupling transmitter 242 and receiver 243 to the mobileantenna. In the preferred embodiment of the present invention, mobile120 is a conventional cellular radiotelephone. The operation of mobile120 is controlled by microcomputer 220 which is coupled by signals 280to and preferably located in mobile radio 112 (or in any other suitableplace, such as, for example, in speakerphone control circuitry 106). Inaddition to its other tasks, microcomputer 220 controls operation ofspeakerphone control circuitry 106.

Speakerphone control circuitry 106 couples and compresses the transmitaudio from auxiliary microphone 102 or the microphone of mobiletelephone 108 to transmitter 242 (the "transmit voice path") and couplesand expands the receive audio from receiver 244 to auxiliary speaker 104or the speaker of mobile telephone 108 (the "receive voice path").Microcomputer 220 switches between the mobile telephone 108 and theauxiliary microphone 102 and speaker 104 depending on whether the mobileuser has selected the hands-free mode of operation. According to thepresent invention, when the mobile user has selected the hands-free modeof operation, microcomputer 220 is coupled to speakerphone controlcircuitry 106 for digitally sampling compressed audio and controllingvoice path gain switching to produce duplex hands free communications.

In the transmit voice path, speakerphone control circuitry 106 includesswitch 201, variable gain amplifier 202, compressor amplifier 203,switch 204 and variable gain amplifier 205. Microcomputer 220 digitallycontrols switch 201, variable gain amplifier 202, switch 204 andvariable gain amplifier 205 by means of data loaded by microcomputer 220into registers 212 and 213. Switch 201 is responsive to a bit fromregister 212 for selecting between auxiliary microphone 102 and themicrophone of mobile telephone 108. Variable gain amplifier 202 isresponsive to four bits from register 212 for selecting one of sixteenpossible gain settings. Compressor amplifier is responsive to six bitsfrom latch 218 for selecting one of sixty-four possible gain settings.In the preferred embodiment, compressor amplifier 203 is similar to thecompressor amplifier described in U.S. Pat. No. 4,550,426, incorporatedherein by reference thereto. Switch 204 is responsive to a bit fromregister 213 for opening or closing the transmit voice path. Variablegain amplifier 205 is responsive to three bits from register 213 forselecting one of eight possible gain settings.

In the receive voice path, speakerphone control circuitry 106 includesvariable gain amplifier 232, expander amplifier 233, switch 234,variable gain amplifier 235 and switch 236. Microcomputer 220 digitallycontrols variable gain amplifier 232, switch 234 and variable gainamplifier 235 by means of data loaded by microcomputer 220 intoregisters 216 and 217. Variable gain amplifier 232 is responsive tothree bits from register 217 for selecting one of eight possible gainsettings. Expander amplifier 233 is responsive to six bits from latch219 for selecting one of sixty-four possible gain settings. In thepreferred embodiment, expander amplifier 233 is similar to the expanderamplifier described in U.S. Pat. No. 4,550,426. Switch 234 is responsiveto a bit from register 216 for opening or closing the receive voicepath. Variable gain amplifier 235 is responsive to four bits fromregister 216 for selecting one of sixteen possible gain settings. Switch236 is responsive to signal 281 from microcomputer 220 for selectingbetween auxiliary speaker 104 and the speaker of mobile telephone 108.

Speakerphone control circuitry 106 also includes rectifier/filter 224,analog-to-digital (A/D) converter 225 and rectifier/filter 226.Rectifier/filter 224 includes a rectifier and filter for filtering theoutput of compressor amplifier 203. Rectifier/filter 226 includes arectifier and filter for filtering the input of expander amplifier 233.A/D converter 225 is preferably a companding or logarithmic six-bitconventional analog-to-digital converter for converting samples of theoutputs of rectifier/filters 224 and 226 to a six-bit digital valuewhich is loaded into register 215. A/D converter 225 is coupled to latch218, compressor amplifier 203 and rectifier/filter 224 for producing 2:1compression of the transmit audio and is coupled to latch 219, expanderamplifier 233 and rectifier/filter 226 for producing 1:2 expansion ofthe receive audio. Under control of microcomputer 220, A/D converter 225also alternately samples on a continuous basis the outputs ofrectifier/filters 224 and 226. Microcomputer 220 may access the digitaloutput of A/D converter 225 by reading the data in register 215.Microcomputer 220 loads data bits C0, C1 and C2 into control register214 for selecting between the outputs of rectifier/filters 224 and 226.Rectifier/filter 224 is selected when C0=0, C1=1 and C2=1, andrectifier/filter 226 when C0=0, C1=0 and C2=1. In the preferredembodiment, speakerphone control circuitry 106 is implemented on acustom integrated circuit and includes additional circuitry andregisters for several other functions.

Microcomputer 220 accesses registers 212-217 by means of a data bus 222including address, control and data lines. In the preferred embodiment,microcomputer 220 is a Motorola type 68HC11 microcomputer which isincluded in mobile radio 112. The address of speakerphone controlcircuitry 106 may be decoded by a conventional binary decoder 221 whichproduces six chip select CS signals for selecting the seven registers212-217. Microcomputer 220 controls whether data is read from or writteninto registers 212-217 by means of the read/write R/W signal, which hasa binary one state for reading data from a register and a binary zerostate for writing data into a register.

Referring to FIG. 3, there is illustrated a register bit map showing theaddresses and data bit assignments for each of the registers 212-217.The four low order bits of the address for the speakerphone controlcircuitry 106 determine which register 212-217 is selected. For example,the control register 214 has binary address zero, the A/D register 215has binary address two, the TX output register 213 has binary address 4,the TX input register 212 has binary address 7, the RX output register216 has binary address 6, and the RX input register 217 has binaryaddress 5. Other addresses are associated with other registers for otherfunctions. If the R/W signal has a binary one state, data is read fromthe addressed register, and if the R/W signal has a binary zero state,data is written into the addressed register.

According to an important feature of the present invention,microcomputer 220 utilizes digital samples from A/D converter 225 tocontinuously generate and store in its memory an envelope signal for thetransmit voice path and an envelope signal for receive voice path.Microcomputer 220 also produces a valley signal for each path by storingdelayed envelope signals. In order to determine when to switch gainbetween the voice paths, microcomputer 220 compares the envelope signalto the valley signal to detect the presence of voice signals and, if thevoice activity is detected for a pre-selected time, the gain of the pathin which voice signals have been detected is increased and the gain ofthe other path is decreased. Gain in the voice paths may be adjusted byusing switch 204 and variable gain amplifier 202 in the transmit voicepath and by using switch 234 and variable gain amplifier 235 in thereceive voice path. Variable gain amplifiers 202 and 235 provide for again variation of up to 20 dB with a typical variation of 15 dB forduplex operation, and switches 204 and 234 provide for a gain variationof greater than 60 dB.

In the preferred embodiment, microcomputer 220 is programmed accordingto the process steps in FIGS. 4A, 4B, 5A, 5B, 6 and 7 for dynamicallydetecting audio signals and switching audio path gain. Referring to FIG.4A, microcomputer 220 enters at start block 402 and proceeds to block404 where the receive envelope signal LTLEVEL is set to be equal to thedigital sample EXP₋₋ RAM from A/D converter 225. Digital sample EXP₋₋RAM is read by microcomputer 220 from register 215. Prior to readingregister 215, microcomputer 220 loads control register 214 with data forselecting rectifier/filter 226. Next, at decision block 406, LTLEVEL iscompared to the receive valley signal LTVALLEY. If LTLEVEL is greaterthan LTVALLEY, YES branch is taken to block 408 where LTVALLEY isincremented by a pre-selected amount, which in the preferred embodimentis one count per 75 msec. If LTLEVEL is not greater than LTVALLEY, NObranch is taken to block 410 where LTVALLEY is decremented by apre-selected amount, which in the preferred embodiment is one count per3 msec.

Then, at decision block 412, LTLEVEL is compared to the receivethreshhold LTTHRESH plus LTVALLEY. LTTHRESH corresponds to the minimumlevel that the receive signal must rise above the receive valley signalto be considered valid audio or voice. The value of LTTHRESH isdetermined by empirical measurements. If LTLEVEL is not greater thanLTTHRESH+LTVALLEY, NO branch is taken to block 418 where the receivecomparator flag LTCOMP is set to a binary zero. If LTLEVEL is greaterthan LTTHRESH+LTVALLEY, YES branch is taken to decision block 414 wherea check is made to determine if a false LTLEVEL has been received. Afalse LTLEVEL is determined by comparing LTLEVEL to the current value ofthe transmit envelope signal MTLEVEL. If LTLEVEL is less than MTLEVEL,YES branch is taken to block 418 to set LCOMP to a binary zero.Otherwise, NO branch is taken to block 416 where LTCOMP is set to abinary one. LTCOMP is set to a binary one to indicate that voice signalshave been detected in the receive voice path.

Next, at decision block 420 is FIG. 4B, a check is made to determine ifLTCOMP is a binary zero. If LTCOMP is a binary zero, YES branch is takento decision block 422 where a check is made to determine if the receivevariable hold time LTVHT is zero. If so, YES branch is taken to block424 where the receive pulse width LTPW is set to zero. If LTVHT is notzero, NO branch is taken to block 426 where LTVHT is decremented by one.Then, at decision block 428, a check is made to determine if LTVHT iszero. If LTVHT is zero, YES branch is taken to block 430 where thethreshold of the transmit voice path MTTHRESH is lowered to increase theaudio sensitivity of the transmit voice path. If LTVHT is not zero, NObranch is taken to block 502 in FIG. 5A.

Returning to decision block 420 in FIG. 4B, if LTCOMP is not a binaryzero, NO branch is taken to decision block 432 where a check is made todetermine if LTPW is greater than the maximum pulse width LTPWMAX. Ifso, YES branch is taken to block 438 where the threshold of the transmitvoice path MTTHRESH is raised to reduce the audio sensitivity of thetransmit voice path. If LTPW is not greater than LTPWMAX, NO branch istaken to block 434 where LTPW is incremented by one. Then, at decisionblock 436, a check is made to determine if LTPW is greater than thereceive variable hold time delay LTVHTDLY. LTVHTDLY is the minimumamount of time that a receive voice signal needs to be present in orderfor it to be considered valid voice. If not, NO branch is taken to block502 in FIG. 5A. If LTPW is greater than LTVHTDLY, YES branch is takenfrom decision block 436 to block 438 where the threshold of the transmitvoice path is raised. Next, at decision block 440, a check is made todetermine if LTVHT is less than the receive variable hold time longLTVHTLNG. LTVHTLNG is the maximum amount of time that the receive voicepath can be held after a voice signal is no longer detected. If LTVHT isless than LTVHTLNG, YES branch is taken to block 442 to increment LTVHTby one. Otherwise, NO branch is taken to block 502 in FIG. 5A.

Referring to FIGS. 5A and 5B, microcomputer 220 now processes thedigital sample from A/D converter 225 COMP₋₋ RAM for the transmit voicepath. At block 502, the transmit envelope signal MTLEVEL is set to beequal to the digital sample COMP₋₋ RAM from A/D converter 225. Digitalsample COMP₋₋ is read by microcomputer 220 from register 215. Prior toreading register 215, microcomputer 220 loads control register 214 withdata for selecting rectifier/filter 224. Next, at decision block 504,MTLEVEL is compared to the transmit valley signal MTVALLEY. If MTLEVELis greater than MTVALLEY, YES branch is taken to block 506 whereMTVALLEY is incremented by a pre-selected amount, which in the preferredembodiment is one count per 75 msec. If MTLEVEL is not greater thanMTVALLEY, NO branch is taken to block 508 where MTVALLEY is decrementedby a pre-selected amount, which in the preferred embodiment is one countper 3 msec.

Then, at decision block 510, MTLEVEL is compared to the transmitthreshold MTTHRESH plus MTVALLEY. MTTHRESH corresponds to the minimumlevel that the transmit signal must rise above the transmit valleysignal to be considered valid audio or voice. The value of MTTHRESH isdetermined by empirical measurements. If MTLEVEL is greater thanMTTHRESH+MTVALLEY, YES branch is taken to block 512 to set to a binaryone. Otherwise, NO branch is taken to block 514 where MTCOMP is set to abinary zero. MTCOMP is set to a binary one to indicate that voicesignals have been detected in the transmit voice path.

Next, at decision block 516 in FIG. 5B, a check is made to determine ifMTCOMP is a binary zero. If MTCOMP is a binary zero, YES branch is takento decision block 518 where a check is made to determine if the transmitvariable hold time MTVHT is zero. If so, YES branch is taken to block520 where the transmit pulse width MTPW is set to zero. If MTVHT is notzero, NO branch is taken to block 522 where MTVHT is decremented by one.Then, at decision block 524, a check is made to determine if MTVHT iszero. If MTVHT is zero, YES branch is taken to block 526 where thethreshold of the receive voice path LTTHRESH is lowered to increase theaudio sensitivity in the receive voice path. If MTVHT is not zero, NObranch is taken to block 602 in FIG. 6.

Returning to decision block 516 in FIG. 5B, if MTCOMP is not a binaryzero, NO branch is taken to decision block 528 where a check is made todetermine if MTPW is greater than the maximum pulse width MTPWMAX. Ifso, YES branch is taken to block 534 where the threshold of the receivevoice path LTTHRESH is raised to reduce the audio sensitivity in thereceive voice path. If MTPW is not greater than MTPWMAX, NO branch istaken to block 530 where MTPW is incremented by one. Then, at decisionblock 532, a check is made to determine if MTPW is greater than thetransmit variable hold time delay MTVHTDLY. MTVHTDLY is the minimumamount of time that a transmit voice signal needs to be present in orderfor it to be considered valid voice. If not, NO branch is taken to block602 in FIG. 6. If MTPW is greater than MTVHTDLY, YES branch is takenfrom decision block 532 to block 534 where the threshold of the receivevoice path LTTHRESH is raised. Next, at decision block 536, a check ismade to determine if MTVHT is less than the transmit variable hold timelong MTVHTLNG. MTVHTLNG is the maximum amount of time that the transmitvoice path can be held after a voice signal is no longer detected. IfMTVHT is less than MTVHTLNG, YES branch is taken to block 538 toincrement MTVHT by one. Otherwise, NO branch is taken to block 602 inFIG. 6.

Referring to FIGS. 6 and 7, microcomputer 220 now processes the LTVHTand MTVHT signals to determine gain switching in the receive andtransmit voice paths. At decision block 602, a check is made todetermine if LTVHT is greater than zero. If so, YES branch is taken toblock 604 where LTDETECT is set to a binary one. If not, NO branch istaken to block 606 where LTDETECT is set to a binary zero. LTDETECT is abinary one when valid voice signals are detected in the receive voicepath. Next, at decision block 608, a check is made to determine if MTVHTis greater than zero. If so, YES branch is taken to block 610 whereMTDETECT is set to a binary one. If not, NO branch is taken to block 612where MTDETECT is set to a binary zero. MTDETECT is a binary one whenvalid voice signals are detected in the transmit voice path.

Next, at decision block 614, a check is made to determine if LTDETECT isa binary zero. If so, YES branch is taken to block 618 where MT.LT isset to a binary one. If not, NO branch is taken to block 616 where MT.LTis set to a binary zero. If MT.LT is a binary one, then voice signals inthe transmit voice path are given priority.

Next, at decision block 702 in FIG. 7, a check is made to determine ifthe duplex mode has been selected. If so, YES branch is taken to block704 where a check is made to determine of MT.LT is a binary one. If so,YES branch is taken to block 706 where the receiver gain is lowered by15 dB using variable gain amplifier 235. Then, at block 708, thetransmitter gain is set to its nominal level using variable gainamplifier 202 and program control returns to other tasks at block 724.

Returning to decision block 704, if MT.LT is not a binary one, NO branchis taken to block 710 where the transmitter gain is lowered by 15 dBusing variable gain amplifier 202. Then, at block 712, the receiver gainis set to its nominal level using variable gain amplifier 235 andprogram control returns to other tasks at block 724.

Returning to decision block 702, if the duplex mode has not beenselected, NO branch is taken to block 714 where a check is made todetermine of MT.LT is a binary one. If MT.LT is a binary one, YES branchis taken to block 716 where the receive voice path is muted using switch234. Then, at block 718, the transmit voice path is unmuted using switch204 and program control returns to other tasks at block 724. If MT.LT isnot a binary one, NO branch is taken from decision block 714 to block720 where the transmit voice path is muted using switch 204. Then, atblock 722, the receive voice path is unmuted using switch 234 andprogram control returns to other tasks at block 724.

The flow diagrams in FIGS. 4A, 4B, 5A, 5B, 6 and 7 provide a detaileddescription of the process steps executed by microcomputer 220 in usingdigitally compressed audio to control voice path gain. By way of analogyto an electrical circuit diagram, these flow diagrams are equivalent toa detailed schematic for an electrical circuit where provision of thecircuitry for electrical circuit blocks corresponds to provision ofactual computer instructions for the flow diagram blocks. Thus, thecoding of the process steps of these flow diagrams into instructions ofsuitable commercially available microcomputers is a mere mechanical stepfor a routineer skilled in the programming art.

In summary, a unique speakerphone for mobile radiotelephones has beendescribed that digitally samples compressed audio and digitally controlsvoice path gain. The speakerphone of the present invention uses acompanding analog-to-digital converter for digitally

Sampling the signals in each voice path and registers for digitallycontrolling voice path gain. Since speakerphone operation is controlledby a microcomputer, operational parameters may be easily adjusted tomeet the needs of a particular application. Therefore, while aparticular embodiment of the present invention has been shown anddescribed, it should be understood that the present invention is notlimited thereto since other embodiments may be made by those skilled inthe art without departing from the true spirit and scope thereof. It isthus contemplated that the present invention encompasses any and allsuch embodiments covered by the following claims.

We claim:
 1. A speakerphone for a radiotelephone for communicating voicesignals by way of a radio channel, said radiotelephone including radiomeans for transmitting a first signal including voice signals on andreceiving a second signal including voice signals from the radiochannel, said speakerphone comprising:microphone means for producing thefirst signal; speaker means for emitting the second signal; compressoramplifying means having an input coupled to said microphone means and anoutput coupled to said radio means and being responsive to first controlsignals for selecting one of a plurality of gain settings and amplifyingand compressing the first signal; expander amplifying means having aninput coupled to said radio means and an output coupled to said speakermeans and being responsive to second control signals for selecting oneof a plurality of gain settings and amplifying and expanding the secondsignal; and control means coupled to the output of said compressoramplifying means and the input of said expander amplifying means fordetecting voice signals in the first and second signals and, in responseto detection of voice signals in one of the first and second signals,producing the first and second control signals for adjusting the gainsettings of said compressor amplifying means and said expanderamplifying means such that the gain setting for said one of the firstand second signals is increased and the gain setting of the other of thefirst and second signals is decreased.
 2. The speakerphone according toclaim 1, wherein said compressor amplifying means includes firstregister means for storing the first control signals, said expanderamplifying means includes second register means for storing the secondcontrol signals, and said control means is coupled to said first andsecond register means.
 3. The speakerphone according to claim 2, whereinsaid control means includes microcomputer means.
 4. The speakerphoneaccording to claim 1, wherein said control means includes microcomputermeans.
 5. The speakerphone according to claim 1, further including firstswitch means coupled between the output of said compressor amplifyingmeans and said radio means and being responsive a third control signalfor substantially muting the first signal, and further including secondswitch means coupled between the output of said expander amplifyingmeans and said speaker means and being responsive a fourth controlsignal for substantially muting the second signal, said control meanscoupled to said first and second switch means for producing the thirdand fourth control signals.
 6. The speakerphone according to claim 1,further including ananog-to-digital converter means alternately coupledto the output of said compressor amplifying means and the input of saidexpander amplifying means, said control means coupled to saidananog-to-digital converter means for detecting voice signals in thefirst and second signals.
 7. The speakerphone according to claim 1,wherein said compressor amplifying means includes a first register forstoring the first control signals, a compressor amplifier having anoutput coupled to said radio means and an input, and a variable gainamplifier having a plurality of gain settings selected by the firstcontrol signals and having an input coupled to said microphone means andan output coupled to the input of said compressor amplifier; and whereinsaid expander amplifying means includes a second register for storingthe second control signals, an expander amplifier having an inputcoupled to said radio means and an output, and a variable gain amplifierhaving a plurality of gain settings selected by the second controlsignals and having an input coupled to the output of said expanderamplifier and an output coupled to said speaker means; and wherein saidcontrol means is coupled to said first and second registers.
 8. Aradiotelephone for communicating voice signals by way of a radiochannel, comprising:microphone means for producing a first signalincluding voice signals; speaker means for emitting a second signalincluding voice signals; radio means for transmitting the first signalon and receiving the second signal from the radio channel; compressoramplifying means having an input coupled to said microphone means and anoutput coupled to said radio means and being responsive to first controlsignals for selecting one of a plurality of gain settings and amplifyingand compressing the first signal; expander amplifying means having aninput coupled to said radio means and an output coupled to said speakermeans and being responsive to second control signals for selecting oneof a plurality of gain settings and amplifying and expanding the secondsignal; and control means coupled to the output of said compressoramplifying means and the input of said expander amplifying means fordetecting voice signals in the first and second signals and, in responseto detection of voice signals in one of the first and second signals,producing the first and second control signals for adjusting the gainsettings of said compressor amplifying means and said expanderamplifying means such that the gain setting for said one of the firstand second signals is increased and the gain setting of the other of thefirst and second signals is decreased.
 9. The radiotelephone accordingto claim 8, wherein said compressor amplifying means includes firstregister means for storing the first control signals, said expanderamplifying means includes second register means for storing the secondcontrol signals, and said control means is coupled to said first andsecond register means.
 10. The radiotelephone according to claim 9,wherein said control means includes microcomputer means.
 11. Theradiotelephone according to claim 8, wherein said control means includesmicrocomputer means.
 12. The radiotelephone according to claim 8,further including first switch means coupled between the output of saidcompressor amplifying means and said radio means and being responsive athird control signal for substantially muting the first signal, andfurther including second switch means coupled between the output of saidexpander amplifying means and said speaker means and being responsive afourth control signal for substantially muting the second signal, saidcontrol means coupled to said first and second switch means forproducing the third and fourth control signals.
 13. The radiotelephoneaccording to claim 8, further including ananog-to-digital convertermeans alternately coupled to the output of said compressor amplifyingmeans and the input of said expander amplifying means, said controlmeans coupled to said ananog-to-digital converter means for detectingvoice signals in the first and second signals.
 14. The radiotelephoneaccording to claim 8, wherein said compressor amplifying means includesa first register for storing the first control signals, a compressoramplifier having an output coupled to said radio means and an input, anda variable gain amplifier having a plurality of gain settings selectedby the first control signals and having an input coupled to saidmicrophone means and an output coupled to the input of said compressoramplifier; and wherein said expander amplifying means includes a secondregister for storing the second control signals, an expander amplifierhaving an input coupled to said radio means and an output, and avariable gain amplifier having a plurality of gain settings selected bythe second control signals and having an input coupled to the output ofsaid expander amplifier and an output coupled to said speaker means; andwherein said control means is coupled to said first and secondregisters.
 15. A radiotelephone for communicating voice signals by wayof a radio channel, comprising:microphone means for producing a firstsignal including voice signals; speaker means for emitting a secondsignal including voice signals; radio means for transmitting the firstsignal on and receiving the second signal from the radio channel;compressor amplifying means having an input coupled to said microphonemeans and an output coupled to said radio means and being responsive tofirst control signals for selecting one of a plurality of gain settingsand amplifying and compressing the first signal; expander amplifyingmeans having an input coupled to said radio means and an output coupledto said speaker means and being responsive to second control signals forselecting one of a plurality of gain settings and amplifying andexpanding the second signal; ananog-to-digital converter meansalternately coupled to the output of said compressor amplifying meansand the input of said expander amplifying means; and control meanscoupled to said ananog-to-digital converter means for detecting voicesignals in the first and second signals and, in response to detection ofvoice signals in one of the first and second signals, producing thefirst and second control signals for adjusting the gain settings of saidcompressor amplifying means and said expander amplifying means such thatthe gain setting for said one of the first and second signals isincreased and the gain setting of the other of the first and secondsignals is decreased.
 16. The radiotelephone according to claim 15,wherein said compressor amplifying means includes first register meansfor storing the first control signals, said expander amplifying meansincludes second register means for storing the second control signals,and said control means is coupled to said first and second registermeans.
 17. The radiotelephone according to claim 16, wherein saidcontrol means includes microcomputer means.
 18. The radiotelephoneaccording to claim 15, wherein said control means includes microcomputermeans.
 19. The radiotelephone according to claim 15, further includingfirst switch means coupled between the output of said compressoramplifying means and said radio means and being responsive a thirdcontrol signal for substantially muting the first signal, and furtherincluding second switch means coupled between the output of saidexpander amplifying means and said speaker means and being responsive afourth control signal for substantially muting the second signal, saidcontrol means coupled to said first and second switch means forproducing the third and fourth control signals.
 20. The radiotelephoneaccording to claim 15, wherein said compressor amplifying means includesa first register for storing the first control signals, a compressoramplifier having an output coupled to said radio means and an input, anda variable gain amplifier having a plurality of gain settings selectedby the first control signals and having an input coupled to saidmicrophone means and an output coupled to the input of said compressoramplifier; and wherein said expander amplifying means includes a secondregister for storing the second control signals, an expander amplifierhaving an input coupled to said radio means and an output, and avariable gain amplifier having a plurality of gain settings selected bythe second control signals and having an input coupled to the output ofsaid expander amplifier and an output coupled to said speaker means; andwherein said control means is coupled to said first and secondregisters.